let getItemFromLocalStorage = function(key) {
	let value = localStorage.getItem(key);
	if (value) return JSON.parse(value);
	else return null;
};

const login = {
	state: {
		currentUser: getItemFromLocalStorage("currentUser") || [],
    },
    
	mutations: {
        SET_USER (state,user) {
            state.currentUser = user
        }
	},
	getters: {
		// ...
		// isPermissionsBtn: state => value => {
		// 	state.currentBtns.incl;
		// 	let flag = state.currentBtns.includes(value);
		// 	console.log("flag", flag);
		// 	return flag;
		// }
	}
};
export default login;